<template>
  <div class="hello">
   <div class="title">获取到的本地数据</div>
   <div class="content_box">
	   <div class="item1" v-for="(item,index) in infolist" :key="index">
		   <span>姓名：{{item.name}}和性别：{{item.sex}}</span>
	   </div>
   </div>
   
  </div>
</template>
<script>
export default {
  name: 'HelloWorld',
  data(){
	  return {
		  infolist:[]
	  }
  },
  mounted() {
  	this.getInfo()
  },
  methods:{
  	 async getInfo(){
  		  const {data:res}=await this.$axios.get('mock.json')
  		  console.log(res.data)
		  this.infolist=res.data
  	  }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="stylus">

</style>
